package com.enjoylearning.ucenter.feignclient.fallbackFactory;

import com.enjoylearning.ucenter.feignclient.CheckCodeClient;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class CheckCodeClientFactory implements FallbackFactory<CheckCodeClient> {

    @Override
    public CheckCodeClient create(Throwable throwable) {
        return new CheckCodeClient(){
            @Override
            public Boolean verify(String key, String code) {
                log.info("verify verify key:{},code:{},but it is wrong", key, code);
                return false;
            }
        };
    }
}
